package com.jjyu.service.impl;

import com.jjyu.dao.FriendMapper;
import com.jjyu.entity.Friend;
import com.jjyu.service.FriendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FriendServiceImpl implements FriendService {
    @Autowired
    private FriendMapper friendMapper;

    @Override
    public List<Friend> getAllFriendInfo(int userId) {
        List<Friend> allFriendInfo = friendMapper.getAllFriendInfo(userId);
        for (Friend friend : allFriendInfo) {
            System.out.println(friend);
        }
        return allFriendInfo;
    }
}
